package com.idea.errorcode.api;

/**
 * @author: 沉香
 * @date: 2025/04/13
 * @description: 异常基类
 */
public abstract class BaseException extends RuntimeException {

    private String errorCode;

    private String message;

    private Integer code;

    public BaseException(final String errorCode, final String message) {
        super(message);
        this.errorCode = errorCode;
        this.message = message;
    }

    public BaseException(final String errorCode, final String message, final Integer code) {
        super(message);
        this.errorCode = errorCode;
        this.message = message;
        this.code = code;
    }


    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
